#!/usr/bin/python

import os, tempfile

logfile = tempfile.NamedTemporaryFile()

import sys
print >> logfile, "sys.argv:", sys.argv

for tag in [	"NAUTILUS_SCRIPT_SELECTED_FILE_PATHS", 
		"NAUTILUS_SCRIPT_SELECTED_URIS",
		"NAUTILUS_SCRIPT_CURRENT_URI", 
		"NAUTILUS_SCRIPT_WINDOW_GEOMETRY", 
		]:
	try:	
		print >> logfile, 'export %s="%s"'%(tag, os.environ[tag])
	except KeyError, e:
		print >> logfile, "KeyError:", e, "not set"
		pass

print >> logfile, "logfile.name:", logfile.name
logfile.flush()
os.system("zenity --text-info --filename %s"%(logfile.name))
